Resume polisher

Welcome to our Resume polisher creation guide! In this section, we will guide you to create an LLM-based application tool that can help you to make your resume the best it can be. Think of your resume as your first impression for a job. You want it to look sharp, right? Our Resume polisher does just that. It checks your resume, suggests improvements, and makes sure it shines. It's like having a friend who's really good at resumes take a look at yours. Whether you need to fix up the wording, highlight your best achievements, or match your skills to what employers are looking for, we've got you covered.

Alt text

Let's get started and turn your resume into something that gets you noticed and gets you the job.

  1. Create a new file and name it resume_polisher.py.
  2. Input the following code into this file.
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  1. # Import necessary packages
  2. from ibm_watsonx_ai import Credentials
  3. from ibm_watsonx_ai import APIClient
  4. from ibm_watsonx_ai.foundation_models import Model, ModelInference
  5. from ibm_watsonx_ai.foundation_models.schema import TextChatParameters
  6. from ibm_watsonx_ai.metanames import GenTextParamsMetaNames
  7. import gradio as gr
  8. # Model and project settings
  9. model_id = "meta-llama/llama-3-2-11b-vision-instruct" # Directly specifying the LLAMA3 model
  10. # Set credentials to use the model
  11. credentials = Credentials(
  12. url = "https://us-south.ml.cloud.ibm.com",
  13. )
  14. # Generation parameters
  15. params = TextChatParameters(
  16. temperature=0.7,
  17. max_tokens=512
  18. )
  19. project_id = "skills-network" # Specifying project_id as provided
  20. # Initialize the model
  21. model = ModelInference(
  22. model_id=model_id,
  23. credentials=credentials,
  24. project_id=project_id,
  25. params=params
  26. )
  27. # Function to polish the resume using the model, making polish_prompt optional
  28. def polish_resume(position_name, resume_content, polish_prompt=""):
  29. # Check if polish_prompt is provided and adjust the combined_prompt accordingly
  30. if polish_prompt and polish_prompt.strip():
  31. prompt_use = f"Given the resume content: '{resume_content}', polish it based on the following instructions: {polish_prompt} for the {position_name} position."
  32. else:
  33. prompt_use = f"Suggest improvements for the following resume content: '{resume_content}' to better align with the requirements and expectations of a {position_name} position. Return the polished version, highlighting necessary adjustments for clarity, relevance, and impact in relation to the targeted role."
  34. messages = [
  35. {
  36. "role": "user",
  37. "content": [
  38. {
  39. "type": "text",
  40. "text": prompt_use
  41. },
  42. ]
  43. }
  44. ]
  45. # Generate a response using the model with parameters
  46. generated_response = model.chat(messages=messages)
  47. # Extract and return the generated text
  48. generated_text = generated_response['choices'][0]['message']['content']
  49. return generated_text
  50. # Create Gradio interface for the resume polish application, marking polish_prompt as optional
  51. resume_polish_application = gr.Interface(
  52. fn=polish_resume,
  53. flagging_mode="never", # Deactivate the flag function in gradio as it is not needed.
  54. inputs=[
  55. gr.Textbox(label="Position Name", placeholder="Enter the name of the position..."),
  56. gr.Textbox(label="Resume Content", placeholder="Paste your resume content here...", lines=20),
  57. gr.Textbox(label="Polish Instruction (Optional)", placeholder="Enter specific instructions or areas for improvement (optional)...", lines=2),
  58. ],
  59. outputs=gr.Textbox(label="Polished Content"),
  60. title="Resume Polish Application",
  61. description="This application helps you polish your resume. Enter the position your want to apply, your resume content, and specific instructions or areas for improvement (optional), then get a polished version of your content."
  62. )
  63. # Launch the application
  64. resume_polish_application.launch()
  1. Execute the script by entering the following command in the terminal:
  1. 1
  1. python3.11 resume_polisher.py
  1. Launch the application by clicking the following button.

If the application launches successfully, it should appear as follows:

Alt text

You are now ready to use this application to enhance your resume. For optimal results, we suggest polishing your resume section by section, allowing the model to perform more effectively.

Example resume content for your use.

  1. 1
  2. 2
  3. 3
  4. 4
  1. '''
  2. Designed and implemented a machine learning system that
  3. predicts hardware malfunction with more than 80% accuracy.
  4. '''

Example polishing instructions for your use.

  1. 1
  2. 2
  3. 3
  4. 4
  1. '''
  2. I use random forest model. So you should make it more specific and eye catching.
  3. Also you should mention results it brings: cost savings by 20%.
  4. '''

(To terminate the script, press Ctrl+C in the terminal and close the appliction window.)

Exercise

The prompt we've provided might not fully meet your needs or preferences. Feel free to modify it in the code as you see fit.

Click here for the answer
  1. 1
  1. prompt_use = f"" # use the prompt as you like